package com.qingge.springboot.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户点赞表
 * </p>
 *
 * @author web_work
 * @since 2023-02-18
 */
@Data
@Getter
@Setter
@TableName("sys_user_like")
@ApiModel(value = "UserLike对象", description = "用户点赞表")
public class UserLike implements Serializable {

    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      @ApiModelProperty("该评论id")
      private Integer likedMessageId;

      @ApiModelProperty("点赞的用户id")
      private Integer likedPostId;

      @ApiModelProperty("点赞状态，0取消，1点赞")
      private Boolean status;

      @ApiModelProperty("创建时间")
      private LocalDateTime createTime;

      @ApiModelProperty("修改时间")
      private LocalDateTime updateTime;


  public UserLike(Integer likedUserId, Integer likedPostId, Integer value) {
    this.likedMessageId=likedUserId;
    this.likedPostId=likedPostId;
    this.status = value == 1;

  }
}
